<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <div id="app">
        <div v-for="(item,index) in list" :key="index">
            <label >{{item}}</label>
            <input type="checkbox" :value="item" v-model="list1" />
        </div>
    </div>
    <script src="./node_modules/vue/dist/vue.js"></script>
    <script>
        // 选中的 不能和v-for是同一个数据
        // 少选一个，循环也会少一个 
      var vm = new Vue({
        el: '#app',
        data: {
            list:['吃饭','睡觉','打豆豆'],
            list1:['吃饭','睡觉','打豆豆'],
        },
        methods: {},
      })
    </script>
  </body>
</html>
